package demo;

import java.util.Scanner;

//Day07
public class Day06004 {
    public static void main(String[] args) {
        int[] arr= {19, 28, 37, 46, 50};
        Scanner scanner=new Scanner(System.in);
        int num=scanner.nextInt();
        for(int i=0;i< arr.length;i++){
            if(num==arr[i]){
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    }
}
